package com.oa.hyperion.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oa.hyperion.entity.Outline;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author Liu
 * @date 2022年01月17日 15:16
 */
public interface OutlineMapper extends BaseMapper<Outline> {

    @Select("select id, title, applicant, create_time, status, check_status, appendix, template_id from outline where applicant = #{id}")
    List<Outline> findByUid(Integer id);

    @Update("update outline set status='n' where id=#{id}")
    void deleteOutline(Integer id);

    @Update("update outline set status = 'o' where id=#{id} ")
    void updateOutline(Integer id);

}
